import {
  ElMain,
  ElHeader,
  ElAside,
  ElContainer,
  ElMenu,
  ElMenuItemGroup,
  ElMenuItem,
  ElButtonGroup,
  ElButton,
  ElCard,
  ElCheckbox,
  ElRow,
  ElCol,
  ElSelect,
  ElOption,
  ElInput,
  ElForm,
  ElFormItem,
  ElDialog,
  ElDropdown,
  ElDropdownMenu,
  ElDropdownItem,
  ElBadge,
  ElAvatar,
  ElTabs,
  ElTabPane,
  ElTable,
  ElTableColumn,
  ElTooltip,
  ElTag,
  ElImage,
  ElBreadcrumb,
  ElBreadcrumbItem,
  ElSwitch,
  ElLink,
  ElMessage,
  ElRadioGroup,
  ElRadio,
  ElRadioButton,
  ElBacktop,
  ElSubmenu,
  ElDatePicker,
  ElProgress,
  ElPagination,
  ElEmpty,
  ElSteps,
  ElStep,
  ElAlert,
  ElSpace,
  ElDivider,
  ElConfigProvider,
  ElDrawer,
  ElLoading,
  ElDescriptions,
  ElDescriptionsItem,
  ElPopconfirm,
  ElMessageBox,
  ElPageHeader,
  ElCascader,
  ElPopover,
  ElUpload,
  ElTimeline,
  ElTimelineItem,
  ElInputNumber,
  ElAutocomplete,
  ElCollapseTransition,
  ElNotification
} from 'element-plus'
import 'element-plus/packages/theme-chalk/src/base.scss'

ElBreadcrumb.props.separatorClass.default = 'el-icon-minus'
ElSwitch.props.activeColor.default = '#0766FE'
ElLink.props.underline.default = false
ElProgress.props.strokeWidth.default = 8
ElCard.props.shadow.default = 'never'
ElAlert.props.closable.default = false
ElDrawer.props.size.default = '528px'
ElDrawer.props.withHeader.default = false
ElDialog.props.width.default = '100%'

class elementPlus {
  install (app) {
    app.use(ElInputNumber)
    app.use(ElPopconfirm)
    app.use(ElConfigProvider)
    app.config.globalProperties.$message = ElMessage
    app.config.globalProperties.$confirm = ElMessageBox.confirm
    app.config.globalProperties.$alert = ElMessageBox.alert
    app.config.globalProperties.$prompt = ElMessageBox.prompt
    app.config.globalProperties.$notify = ElNotification
    app.use(ElUpload)
    app.use(ElPopover)
    app.use(ElLoading)
    app.use(ElMain)
    app.use(ElHeader)
    app.use(ElAside)
    app.use(ElContainer)
    app.use(ElMenu)
    app.use(ElMenuItemGroup)
    app.use(ElMenuItem)
    app.use(ElButtonGroup)
    app.use(ElButton)
    app.use(ElCard)
    app.use(ElCheckbox)
    app.use(ElRow)
    app.use(ElCol)
    app.use(ElSelect)
    app.use(ElOption)
    app.use(ElInput)
    app.use(ElForm)
    app.use(ElFormItem)
    app.use(ElDialog)
    app.use(ElDropdown)
    app.use(ElDropdownMenu)
    app.use(ElDropdownItem)
    app.use(ElBadge)
    app.use(ElAvatar)
    app.use(ElTabs)
    app.use(ElTabPane)
    app.use(ElTable)
    app.use(ElTableColumn)
    app.use(ElTooltip)
    app.use(ElTag)
    app.use(ElImage)
    app.use(ElBreadcrumb)
    app.use(ElBreadcrumbItem)
    app.use(ElSwitch)
    app.use(ElLink)
    app.use(ElRadioGroup)
    app.use(ElRadio)
    app.use(ElRadioButton)
    app.use(ElBacktop)
    app.use(ElSubmenu)
    app.use(ElDatePicker)
    app.use(ElProgress)
    app.use(ElPagination)
    app.use(ElEmpty)
    app.use(ElSteps)
    app.use(ElStep)
    app.use(ElAlert)
    app.use(ElSpace)
    app.use(ElDivider)
    app.use(ElDrawer)
    app.use(ElDescriptions)
    app.use(ElDescriptionsItem)
    app.use(ElPageHeader)
    app.use(ElCascader)
    app.use(ElTimeline)
    app.use(ElTimelineItem)
    app.use(ElAutocomplete)
    app.use(ElCollapseTransition)
  }
}

export default elementPlus
